﻿@{
    ViewBag.Title = "商城后台";
    Layout = null;
}
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>登录-@ViewBag.Title</title>
    <link rel="stylesheet" href="~/Content/assets/css/amazeui.css" />
    <link rel="stylesheet" href="~/Content/assets/css/page/form.css" />
    <script src="~/Scripts/jquery-1.10.2.js"></script>
</head>
<body>
    <div class="account-pages">
        <div class="wrapper-page">
            <div class="text-center">
                <a href="index.html" class="logo"><span>Admin<span>to</span></span></a>
            </div>

            <div class="m-t-40 card-box">
                <div class="text-center">
                    <h4 class="text-uppercase font-bold m-b-0">Sign In</h4>
                </div>
                <div class="panel-body">
                    <form class="am-form">
                        <div class="am-g">
                            <div class="am-form-group">
                                <input type="text" id="name" name="UserName" class="am-radius" placeholder="Username">
                            </div>

                            <div class="am-form-group form-horizontal m-t-20">
                                <input type="password" id="pwd" name="PassWord" class="am-radius" placeholder="Password">
                            </div>

                            <div class="am-form-group ">
                                <label style="font-weight: normal;color: #999;">
                                    <input type="checkbox" class="remeber"> Remember me
                                </label>
                            </div>

                            <div class="am-form-group ">
                                <button type="button" onclick="abc()" class="am-btn am-btn-primary am-radius" style="width: 100%;height: 100%;">Log In</button>
                            </div>

                            <div class="am-form-group ">
                                <a href="page-recoverpw.html" class="text-muted"><i class="fa fa-lock m-r-5"></i> Forgot your password?</a>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</body>
</html>
<script>
    function abc() {
        var name = $("#name").val();
        var pwd = $("#pwd").val();
        $.get("http://www.mall.com/v1/Admin/Login?name="+name+"&pwd="+pwd, {}, function (data) {
            if (data.returncode == 0 && data.result == 0) {
                window.location.href = "Index";
            }
            else {
                alert(data.message);
            }
        })
    }

</script>
